#!/user/bin/env python3
# -*- coding: utf-8 -*-

import pytest,subprocess,os


#pytest -sv --alluredir target/allure-results
#allure generate ./target/allure-results -o ./target/allure-report --clean


if __name__ == '__main__':

    pytest.main(['-vs', "--env=test", "--alluredir", "target/allure-results"])  # '-k test_0003',#'./test_case',
    allure_html = 'allure generate ./target/allure-results -o ./target/allure-report --clean'  # 生成allure的html报告
    #subprocess.call(allure_html, shell=True)  # 生成allure的html报告
    os.system(allure_html)